
### Qt Gui stuff ###
SET(headers_ui 
	./ObjDeletionHandler.h
)

#This will generate moc_* for Qt
QT4_WRAP_CPP(moc_srcs ${headers_ui})

SET(SRC_FILES
    main.cpp
    ${moc_srcs} 
)

SET(INCLUDE_DIRS
	${PROJECT_SOURCE_DIR}/corelib/include
	${PROJECT_SOURCE_DIR}/guilib/include
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${UtiLite_INCLUDE_DIRS}
    ${OpenCV_INCLUDE_DIRS}
)

INCLUDE(${QT_USE_FILE})

SET(LIBRARIES
    ${UtiLite_LIBRARIES}
    ${QT_LIBRARIES} 
	${OpenCV_LIBS} 
)

# Make sure the compiler can find include files from our library.
INCLUDE_DIRECTORIES(${INCLUDE_DIRS})

# Add binary
ADD_EXECUTABLE(main_app WIN32 ${SRC_FILES})
TARGET_LINK_LIBRARIES(main_app corelib guilib ${LIBRARIES})

SET_TARGET_PROPERTIES(main_app PROPERTIES OUTPUT_NAME ${PROJECT_PREFIX})

#---------------------------
# Installation stuff
#--------------------------- 
INSTALL(TARGETS main_app
        RUNTIME DESTINATION "${INSTALL_BIN_DIR}" COMPONENT runtime)
  
